import 'BleBean.dart';
import 'package:lib_bt/bean/BleBeanInterface.dart';
import 'package:lib_bt/listener/CheckBleSupportInterface.dart';
import 'package:lib_bt/send/SendInterface.dart';

import 'UUIDConfig.dart';

///测试蓝牙兼容检测
class DemoBleSupportImpl implements CheckBleSupportInterface {
  static List<List> supportList = [];

  DemoBleSupportImpl() {
    supportList.add([1, 0x54, 0x59, 0x00, 0x01]);
  }

  @override
  BleBean? isSupport(BleBeanInterface bean) {
    BleBean colorBleBean = BleBean(bean:bean);

    List<String>  list = [
      "Spot",
      "color",
      "LED",
      "eyes",
      "show"
    ];

    for(var name in list){
      if(bean.name.contains(name)){
        return null;
      }
    }
    return colorBleBean;
  }

  @override
  SendInterface? getSendInterface(BleBeanInterface bean) {
    return null;
  }

  @override
  String getUUIDInfo() {
    return UUIDConfig.instance.getUUIDJson();
  }

  @override
  String getSupportName() {
    return "测试 设备";
  }
}
